# import matplotlib.pyplot as plt
# import seaborn as sns
#
# # 数据准备
# x = ['Cat1', 'Cat2', 'Cat3', 'Cat4', 'Cat5']
# y = [5, 4, 8, 12, 7]
# # # 用Matplotlib画条形图
# # plt.bar(x, y)
# # plt.show()
# # 用Seaborn画条形图
# sns.barplot(x, y)
# plt.show()


from pyecharts.charts import Bar
from pyecharts import options as opts

# # V1 版本开始支持链式调用
# bar = (
#     Bar()
#     .add_xaxis(["衬衫", "毛衣", "领带", "裤子", "风衣", "高跟鞋", "袜子"])
#     .add_yaxis("商家A", [114, 55, 27, 101, 125, 27, 105])
#     .add_yaxis("商家B", [57, 134, 137, 129, 145, 60, 49])
#     .set_global_opts(title_opts=opts.TitleOpts(title="某商场销售情况"))
#
# )
# bar.render()


# coding:utf-8
from pyecharts.charts import Bar, Page
from pyecharts import options as opts
import os
if __name__ == '__main__':
    # pyecharts=1.8.1
    # 安装 python -m pip install pyecharts
    page = Page(layout=Page.DraggablePageLayout)
    bar = Bar()
    bar.add_xaxis(["衬衫", "毛衣", "领带", "裤子", "风衣", "高跟鞋", "袜子"])
    bar.add_yaxis("商家A", [114, 55, 27, 101, 125, 27, 105])
    bar.add_yaxis("商家B", [57, 134, 137, 129, 145, 60, 49])
    bar.add_yaxis("商家C", [57, 134, 137, 129, 145, 60, 49])
    bar.set_global_opts(title_opts=opts.TitleOpts(title="某商场销售情况1"))
    bar1 = Bar()
    bar1.add_xaxis(["衬衫", "毛衣", "领带", "裤子", "风衣", "高跟鞋", "袜子"])
    bar1.add_yaxis("商家A", [114, 55, 27, 101, 125, 27, 105])
    bar1.add_yaxis("商家B", [57, 134, 137, 129, 145, 60, 49])
    bar1.add_yaxis("商家C", [57, 134, 137, 129, 145, 60, 49])
    bar1.set_global_opts(title_opts=opts.TitleOpts(title="某商场销售情况2"))
    # 将柱状图bar和bar1添加到page页面中，这样就可以将两个图标绘制成一个html中了
    page.add(bar, bar1)
    page.render("test.html")
    os.system("test.html")



#__ac_nonce=06239881600805a3520e1; __ac_signature=_02B4Z6wo00f01rRtUKgAAIDCNG-q6JK.Biq0TVQAAM8v81; ttcid=0ea83982fe644b00896bee1693e68f1825; ttwid=1%7CPXaoLV0RoutLaL7RJkYBPJ02FkDhTS1a_wrRv1Dg980%7C1647937559%7C896e2b99eb98cc8633929bb70faff3a95febaaa7abf425f0fc91272078edb8f5; _tea_utm_cache_6383=undefined; douyin.com; strategyABtestKey=1647937558.629; passport_csrf_token=588d106d304743ecaa39b3b4ae2b4b5a; passport_csrf_token_default=588d106d304743ecaa39b3b4ae2b4b5a; s_v_web_id=verify_l11vh2ih_3PwEqGks_9mXd_4zL4_91Jm_9cXcseJ0u7Rn; AB_LOGIN_GUIDE_TIMESTAMP=1647937558551; MONITOR_WEB_ID=6bb407ab-6f02-43b9-89f7-772c1c8c82dd; _tea_utm_cache_1300=undefined; n_mh=ObE5gxKMT3O4V3x1uNebby-qOOJ34ys4h-6ep-rz7uM; sso_uid_tt=fe8b8168c86623aa1e478c642c12c609; sso_uid_tt_ss=fe8b8168c86623aa1e478c642c12c609; toutiao_sso_user=00372a3199a977afc0933153110886c0; toutiao_sso_user_ss=00372a3199a977afc0933153110886c0; sid_ucp_sso_v1=1.0.0-KDljNzk1MWRkMjhmYTU2Y2ExODg4ZTIzNWFkMjQ5ZmUwMThkMTU5MDEKHQjOy5Hz9QIQzJDmkQYY7zEgDDDr_pHZBTgGQPQHGgJsZiIgMDAzNzJhMzE5OWE5NzdhZmMwOTMzMTUzMTEwODg2YzA; ssid_ucp_sso_v1=1.0.0-KDljNzk1MWRkMjhmYTU2Y2ExODg4ZTIzNWFkMjQ5ZmUwMThkMTU5MDEKHQjOy5Hz9QIQzJDmkQYY7zEgDDDr_pHZBTgGQPQHGgJsZiIgMDAzNzJhMzE5OWE5NzdhZmMwOTMzMTUzMTEwODg2YzA; msToken=oh0L5-bVL7Nm44sBySBN5OddgnETJJaffKq8EyM9Hy2boqwWZkhRcdQ30vneg-dfyE44a2oO9owLk5gMUBMoGRlfmSvFBA71uW_O4vWCwcILJ8K8yTKafA==; odin_tt=7dd2d77ea0d8cc937b2f79399a1d17ef89d4fa4d65e4f4a697882fa69797d6a3d6984114599654fad0e1178e91ce5de8f603c2018dc880d052b14688d9dda119; passport_auth_status=780aa11b9d4fda60166f6ce0ac6a2f47%2C; passport_auth_status_ss=780aa11b9d4fda60166f6ce0ac6a2f47%2C; sid_guard=5f3b406575a23b4ca5f578fe2cdd1d62%7C1647937613%7C5183999%7CSat%2C+21-May-2022+08%3A26%3A52+GMT; uid_tt=25e882be4bbd2f88610ca49afc965a5f; uid_tt_ss=25e882be4bbd2f88610ca49afc965a5f; sid_tt=5f3b406575a23b4ca5f578fe2cdd1d62; sessionid=5f3b406575a23b4ca5f578fe2cdd1d62; sessionid_ss=5f3b406575a23b4ca5f578fe2cdd1d62; sid_ucp_v1=1.0.0-KDAyMDAyMTcxNzJlYWYzMDYwMzMxZDUyYWRjMjI2OWQ0YTEyM2YyYjIKFwjOy5Hz9QIQzZDmkQYY7zEgDDgGQPQHGgJsZiIgNWYzYjQwNjU3NWEyM2I0Y2E1ZjU3OGZlMmNkZDFkNjI; ssid_ucp_v1=1.0.0-KDAyMDAyMTcxNzJlYWYzMDYwMzMxZDUyYWRjMjI2OWQ0YTEyM2YyYjIKFwjOy5Hz9QIQzZDmkQYY7zEgDDgGQPQHGgJsZiIgNWYzYjQwNjU3NWEyM2I0Y2E1ZjU3OGZlMmNkZDFkNjI; FOLLOW_LIVE_POINT_INFO=MS4wLjABAAAA7rfyOxmavlEI8IJo-7kF3JdvWWhlh0ZI4swD4u3Y1K8%2F1647964800000%2F0%2F1647937613994%2F0; home_can_add_dy_2_desktop=1; msToken=iQtJtnJaJeFKVrFiOQOy2CeAPvJ2GoQHm3dJK38G9oQIDaW_0M3JeXEmf45hQCaVA_klJ3yhLiwW7TPlV_p18zcaDGjy17RvWS2EZNgrj5kTpT_dgHV7AMYiJ5z6HCE=; tt_scid=vAC4MmV1dHXHNhMvfMoBm583RMi21tggEqJgvtuFmdp-RnPlVvylURsD1YCBngqfa0d3; THEME_STAY_TIME=125020


# function I() {
#             return I = (0,
#             i.Z)(c().mark((function e(t) {
#                 var n, i, l, o, a, d, p, m, v, f, g, h, w, b = arguments;
#                 return c().wrap((function(e) {
#                     for (; ; )
#                         switch (e.prev = e.next) {
#                         case 0:
#                             return a = t.awemeId,
#                             d = t.cursor,
#                             p = t.count,
#                             m = t.itemType,
#                             v = void 0 === m ? Z.Normal : m,
#                             f = t.fetchType,
#                             g = void 0 === f ? "user" : f,
#                             h = b.length > 1 && b[1] !== undefined ? b[1] : null,
#                             e.next = 4,
#                             (0,
#                             s.U2)("/aweme/v1/web/comment/list/", (0,
#                             u.Z)((0,
#                             u.Z)({}, T), {}, (o = {},
#                             (0,
#                             r.Z)(o, "aweme_id", a),
#                             (0,
#                             r.Z)(o, "cursor", d),
#                             (0,
#                             r.Z)(o, "count", p),
#                             (0,
#                             r.Z)(o, "item_type", v),
#                             (0,
#                             r.Z)(o, "rcFT", (null === (n = window) || void 0 === n || null === (i = n.byted_acrawler) || void 0 === i || null === (l = i.e) || void 0 === l ? void 0 : l.call(i, g)) || ""),
#



